use std::collections::HashMap;

use day19::rating::*;

#[test]
fn test_str_to_rating() {
    let rating: Rating = "{x=787,m=2655,a=1222,s=2876}".into();
    assert_eq!(
        rating,
        Rating::new(HashMap::from([
            (PartKind::Extremely, 787),
            (PartKind::Musical, 2655),
            (PartKind::Aerodynamic, 1222),
            (PartKind::Shiny, 2876)
        ]))
    );
}